<?php
	/**
	* 
	*/
	class RecordsModel extends Model
	{
		
		public function getRecords($condition,$start,$size){
			$return = $this->where($condition)->limit($start,$size)->order('id desc')->select();
			log::write(var_export($this->getLastsql(),true),'getRecords');
			return $return;
		}

		public function getRecordCount($condition){
			return $this->where($condition)->count();
		}

		public function delRecord($condition){
			$return = $this->where($condition)->delete();
			//echo $this->getLastSql();
			return $return;
		}

		public function addRecord($data){
			return $this->data($data)->add();
		}
	}